<?php
/**
 * This is Lil's route configuration file.
 *
 * Establish routes to Lil's controllers and their actions.
 *
 * @copyright     Copyright 2008-2010, LilCake.net
 * @link          http://lilcake.net LilCake.net
 * @package       lil
 * @subpackage    lil.config
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 */
	Router::connect('/admin', array(
		'plugin'     => 'lil',
		'controller' => 'areas', 
		'action'     => 'dashboard',
		'admin'      => true
	));
	
	// login logout
	Router::connect('/lil/login', array(
		'plugin'     => 'lil',
		'controller' => 'users',
		'action'     => 'login',
		'admin'      => null
	));
	
	Router::connect('/lil/logout', array(
		'plugin'     => 'lil',
		'controller' => 'users',
		'action'     => 'logout',
		'admin'      => null
	));
	
	Router::connect('/lil/lil_scan_applet.jnlp', array(
		'plugin'     => 'lil',
		'controller' => 'areas',
		'action'     => 'acquire',
		'admin'      => true
	));
	// plugins should be set prior to thic config inclusion
	// so we can include plugin configs
	/*if ($plugins = Configure::read('Lil.plugins')) {
		if (!$plugin_routes = Configure::read('Lil.pluginPath')) {
			$plugin_routes = APP . 'plugins' . DS;
		}
		foreach ($plugins as $plugin) {
			$plugin_routes = $plugin_routes . Inflector::underscore('Lil' . $plugin) . DS . 'config' . DS . 'routes.php';
			if (file_exists($plugin_routes)) {
				include $plugin_routes;
			}
		}
	}*/